#include "lolevel.h"
#include "platform.h"
#include "core.h"

static long *nrflag = (long*)0x7290; /* G11 above "aShuttersoundta" usage @FF9687A0 */

#include "../../../generic/capt_seq.c"
void __attribute__((naked,noinline)) capt_seq_task() {
 asm volatile (

				"STMFD   SP!, {R3-R9,LR}\n"
                "LDR     R6, =0x2C64\n"
                "LDR     R4, =0x38A78\n"
                "MOV     R9, #1\n"
                "MOV     R7, #0\n"
"loc_FF87B080:\n"
               "LDR     R0, [R6,#4]\n"
               "MOV     R2, #0\n"
               "MOV     R1, SP\n"
               "BL      sub_FF83891C\n"
               "TST     R0, #1\n"
               "BEQ     loc_FF87B0AC\n"
               "LDR     R1, =0x5B3\n"
               "LDR     R0, =0xFF87A868\n"
               "BL      sub_FF81E88C\n"
               "BL      sub_FF81E844\n"
               "LDMFD   SP!, {R3-R9,PC}\n"
"loc_FF87B0AC:\n"
               "LDR     R0, [SP]\n"
               "LDR     R1, [R0]\n"
               "CMP     R1, #0x22\n"
               "ADDLS   PC, PC, R1,LSL#2\n"
               "B       loc_FF87B3A4\n"
"loc_FF87B0C0:\n"
               "B       loc_FF87B14C\n"
"loc_FF87B0C4:\n"
               "B       loc_FF87B1B8\n"
"loc_FF87B0C8:\n"
               "B       loc_FF87B1F4\n"
"loc_FF87B0CC:\n"
               "B       loc_FF87B208\n"
"loc_FF87B0D0:\n"
               "B       loc_FF87B200\n"
"loc_FF87B0D4:\n"
               "B       loc_FF87B210\n"
"loc_FF87B0D8:\n"
               "B       loc_FF87B218\n"
"loc_FF87B0DC:\n"
               "B       loc_FF87B220\n"
"loc_FF87B0E0:\n"
               "B       loc_FF87B278\n"
"loc_FF87B0E4:\n"
               "B       loc_FF87B2A0\n"
"loc_FF87B0E8:\n"
               "B       loc_FF87B284\n"
"loc_FF87B0EC:\n"
               "B       loc_FF87B290\n"
"loc_FF87B0F0:\n"
               "B       loc_FF87B298\n"
"loc_FF87B0F4:\n"
               "B       loc_FF87B2A8\n"
"loc_FF87B0F8:\n"
               "B       loc_FF87B2B0\n"
"loc_FF87B0FC:\n"
               "B       loc_FF87B2B8\n"
"loc_FF87B100:\n"
               "B       loc_FF87B2C0\n"
"loc_FF87B104:\n"
               "B       loc_FF87B2C8\n"
"loc_FF87B108:\n"
               "B       loc_FF87B2D0\n"
"loc_FF87B10C:\n"
               "B       loc_FF87B2D8\n"
"loc_FF87B110:\n"
               "B       loc_FF87B2E0\n"
"loc_FF87B114:\n"
               "B       loc_FF87B2E8\n"
"loc_FF87B118:\n"
               "B       loc_FF87B2F0\n"
"loc_FF87B11C:\n"
               "B       loc_FF87B2FC\n"
"loc_FF87B120:\n"
               "B       loc_FF87B304\n"
"loc_FF87B124:\n"
               "B       loc_FF87B310\n"
"loc_FF87B128:\n"
               "B       loc_FF87B318\n"
"loc_FF87B12C:\n"
               "B       loc_FF87B348\n"
"loc_FF87B130:\n"
               "B       loc_FF87B350\n"
"loc_FF87B134:\n"
               "B       loc_FF87B358\n"
"loc_FF87B138:\n"
               "B       loc_FF87B360\n"
"loc_FF87B13C:\n"
               "B       loc_FF87B368\n"
"loc_FF87B140:\n"
               "B       loc_FF87B370\n"
"loc_FF87B144:\n"
               "B       loc_FF87B37C\n"
"loc_FF87B148:\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B14C:\n"
               "BL      sub_FF87B9BC\n"
			   "BL      shooting_expo_param_override\n"  // + 
               "BL      sub_FF878A48\n"
// copied over from SX10 don't know if we need it yet
//  this code added to avoid some incorrect behavior if overrides are used.
//  but it can cause some unexpected side effects. In this case, remove this code!
                 "MOV     R0, #0\n"
                 "STR     R0, [R4,#0x24]\n"  // fixes overrides  behavior at short shutter press
 //  end of my code
               "LDR     R0, [R4,#0x24]\n"
               "CMP     R0, #0\n"
               "BEQ     loc_FF87B3B0\n"
               "BL      sub_FF87A53C\n"
               "MOV     R5, R0\n"
               "LDR     R0, [R4,#0x24]\n"
               "CMP     R0, #0\n"
               "BEQ     loc_FF87B194\n"
               "MOV     R0, #0xC\n"
               "BL      sub_FF8803B8\n"
               "TST     R0, #1\n"
               "STRNE   R9, [R6,#0x10]\n"
               "LDRNE   R0, [R5,#8]\n"
               "ORRNE   R0, R0, #0x40000000\n"
               "STRNE   R0, [R5,#8]\n"
               "BNE     loc_FF87B3B0\n"
"loc_FF87B194:\n"
               "MOV     R0, R5\n"
               "BL      sub_FF967E0C\n"
               "MOV     R0, R5\n"
               "BL      sub_FF87A91C\n"
               "MOV     R0, R5\n"

             //"BL      sub_FF9686A8\n" // -
			   "BL      sub_FF9686A8_my\n" //-------->
			   "BL      capt_seq_hook_raw_here\n"      // +
               "TST     R0, #1\n"
               "STRNE   R9, [R6,#0x10]\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B1B8:\n"
               "LDR     R0, [R4,#0x24]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF87B1E4\n"
               "MOV     R0, #0xC\n"
               "BL      sub_FF8803B8\n"
               "TST     R0, #1\n"
               "LDRNE   R0, [SP]\n"
               "MOVNE   R1, #1\n"
               "LDRNE   R2, [R0,#0xC]\n"
               "MOVNE   R0, #1\n"
               "BNE     loc_FF87B270\n"
"loc_FF87B1E4:\n"
               "LDR     R0, [SP]\n"
               //"BL      sub_FF87A994\n" // - capt_seq_hook ist called in this subroutine
			   "BL      sub_FF87A994_my\n"
"loc_FF87B1EC:\n"
               "STR     R7, [R4,#0x24]\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B1F4:\n"
               "MOV     R0, #1\n"
               "BL      sub_FF87BC6C\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B200:\n"
               "BL      sub_FF87B66C\n"
               "B       loc_FF87B1EC\n"
"loc_FF87B208:\n"
               "BL      sub_FF87B99C\n"
               "B       loc_FF87B1EC\n"
"loc_FF87B210:\n"
               "BL      sub_FF87B9A4\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B218:\n"
               "BL      sub_FF87BB5C\n"
               "B       loc_FF87B27C\n"
"loc_FF87B220:\n"
               "LDR     R5, [R0,#0xC]\n"
               "BL      sub_FF87B9AC\n"
               "MOV     R0, R5\n"
               "BL      sub_FF966E88\n"
               "TST     R0, #1\n"
               "MOV     R8, R0\n"
               "BNE     loc_FF87B260\n"
               "BL      sub_FF88D770\n"
               "STR     R0, [R5,#0x18]\n"
               "MOV     R0, R5\n"
               "BL      sub_FF9685C0\n"
               "MOV     R0, R5\n"
               "BL      sub_FF9689C0\n"
               "MOV     R8, R0\n"
               "LDR     R0, [R5,#0x18]\n"
               "BL      sub_FF88D984\n"
"loc_FF87B260:\n"
               "BL      sub_FF87B99C\n"
               "MOV     R2, R5\n"
               "MOV     R1, #9\n"
               "MOV     R0, R8\n"
"loc_FF87B270:\n"
               "BL      sub_FF878F74\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B278:\n"
               "BL      sub_FF87BBEC\n"
"loc_FF87B27C:\n"
               "BL      sub_FF878A48\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B284:\n"
               "LDR     R0, [R4,#0x54]\n"
               "BL      sub_FF87C270\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B290:\n"
               "BL      sub_FF87C518\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B298:\n"
               "BL      sub_FF87C5AC\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2A0:\n"
               "BL      sub_FF87B99C\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2A8:\n"
               "BL      sub_FF9670B4\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2B0:\n"
               "BL      sub_FF96730C\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2B8:\n"
               "BL      sub_FF9673AC\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2C0:\n"
               "BL      sub_FF9674E0\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2C8:\n"
               "BL      sub_FF9675D4\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2D0:\n"
               "MOV     R0, #0\n"
               "B       loc_FF87B2F4\n"
"loc_FF87B2D8:\n"
               "BL      sub_FF967B50\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2E0:\n"
               "BL      sub_FF967BE0\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2E8:\n"
               "BL      sub_FF967CA0\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2F0:\n"
               "MOV     R0, #1\n"
"loc_FF87B2F4:\n"
               "BL      sub_FF967A00\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B2FC:\n"
               "BL      sub_FF87BE88\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B304:\n"
               "BL      sub_FF87BF28\n"
               "BL      sub_FF87B4D8\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B310:\n"
               "BL      sub_FF96788C\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B318:\n"
               "MOV     R2, #2\n"
               "ADD     R1, R4, #0x62\n"
               "MOV     R0, #0x6F\n"
               "BL      sub_FF88D5E0\n"
               "TST     R0, #1\n"
               "LDRNE   R1, =0x6AA\n"
               "LDRNE   R0, =0xFF87A868\n"
               "BLNE    sub_FF81E88C\n"
               "LDRH    R0, [R4,#0x62]\n"
               "CMP     R0, #1\n"
               "BLEQ    sub_FF967880\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B348:\n"
               "BL      sub_FF967930\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B350:\n"
               "BL      sub_FF87A7F4\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B358:\n"
               "BL      sub_FF83654C\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B360:\n"
               "BL      sub_FF87E964\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B368:\n"
               "BL      sub_FF87E9CC\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B370:\n"
               "BL      sub_FF87EA28\n"
               "BL      sub_FF87E9E8\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B37C:\n"
               "MOV     R0, #1\n"
               "BL      sub_FF969228\n"
               "MOV     R0, #1\n"
               "BL      sub_FF969338\n"
               "LDRH    R0, [R4,#0xA0]\n"
               "CMP     R0, #4\n"
               "BNE     loc_FF87B3B0\n"
               "BL      sub_FF87E9CC\n"
               "BL      sub_FF87EE14\n"
               "B       loc_FF87B3B0\n"
"loc_FF87B3A4:\n"
               "LDR     R1, =0x708\n"
               "LDR     R0, =0xFF87A868\n"
               "BL      sub_FF81E88C\n"
"loc_FF87B3B0:\n"
               "LDR     R0, [SP]\n"
               "LDR     R1, [R0,#4]\n"
               "LDR     R0, [R6]\n"
               "BL      sub_FF885418\n"
               "LDR     R5, [SP]\n"
               "LDR     R0, [R5,#8]\n"
               "CMP     R0, #0\n"
               "LDREQ   R1, =0x131\n"
               "LDREQ   R0, =0xFF87A868\n"
               "BLEQ    sub_FF81E88C\n"
               "STR     R7, [R5,#8]\n"
               "B       loc_FF87B080\n"
 );
}

void __attribute__((naked,noinline)) sub_FF87A994_my() {
 asm volatile ( 
               "STMFD   SP!, {R3-R9,LR}\n"
               "LDR     R4, [R0,#0xC]\n"
               "LDR     R5, =0x38A78\n"
               "LDR     R0, [R4,#8]\n"
               "LDR     R6, =0x420A\n"
               "ORR     R0, R0, #1\n"
               "STR     R0, [R4,#8]\n"
               "LDRH    R0, [R5]\n"
               "LDR     R8, =0x2C64\n"
               "MOV     R7, #0\n"
               "CMP     R0, R6\n"
               "BEQ     loc_FF87AA38\n"
               "LDRH    R0, [R5,#0x9E]\n"
               "CMP     R0, #3\n"
               "BEQ     loc_FF87AA98\n"
               "LDR     R0, [R4,#0xC]\n"
               "CMP     R0, #1\n"
               "BLS     loc_FF87AA44\n"
               "LDRH    R0, [R5,#0x9C]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF87AA98\n"
               "LDRH    R0, [R5,#0x98]\n"
               "CMP     R0, #2\n"
               "BNE     loc_FF87AA50\n"
               "BL      sub_FF87BFD8\n"
               "LDRH    R0, [R5]\n"
               "CMP     R0, R6\n"
               "BEQ     loc_FF87AA38\n"
               "LDRH    R0, [R5,#0x9E]\n"
               "CMP     R0, #3\n"
               "BEQ     loc_FF87AA98\n"
               "LDR     R0, [R4,#0xC]\n"
               "CMP     R0, #1\n"
               "BLS     loc_FF87AA44\n"
               "LDRH    R0, [R5,#0x9C]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF87AA98\n"
               "LDRH    R0, [R5,#0x98]\n"
               "CMP     R0, #2\n"
               "BEQ     loc_FF87AA7C\n"
               "B       loc_FF87AA50\n"
"loc_FF87AA38:\n"
               "LDRH    R0, [R5,#0x9E]\n"
               "CMP     R0, #3\n"
               "BEQ     loc_FF87AA98\n"
"loc_FF87AA44:\n"
               "LDRH    R0, [R5,#0x9C]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF87AA98\n"
"loc_FF87AA50:\n"
               "LDRH    R0, [R5,#0x98]\n"
               "CMP     R0, #1\n"
               "BNE     loc_FF87AA98\n"
               "LDRH    R0, [R5]\n"
               "CMP     R0, R6\n"
               "LDRNE   R0, [R4,#0xC]\n"
               "CMPNE   R0, #1\n"
               "BLS     loc_FF87AA98\n"
               "LDR     R0, [R4,#0x10]\n"
               "CMP     R0, #1\n"
               "BNE     loc_FF87AA98\n"
"loc_FF87AA7C:\n"
               "MOV     R3, #0x268\n"
               "STR     R3, [SP]\n"
               "LDR     R0, [R8]\n"
               "LDR     R2, =0xEA60\n"
               "LDR     R3, =0xFF87A868\n"
               "MOV     R1, #0x40000000\n"
               "BL      sub_FF880720\n"
"loc_FF87AA98:\n"
               "BL      sub_FF87A7F4\n"
               "LDR     R0, [R5,#0x24]\n"
               "CMP     R0, #0\n"
               "MOVEQ   R0, #2\n"
               "BLEQ    sub_FF876BF8\n"
               "BL      sub_FF87B9AC\n"
               "LDR     R0, [R5,#0x24]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF87AB50\n"
               "MOV     R0, #0\n"
               "BL      sub_FF969228\n"
               "MOV     R0, #0\n"
               "BL      sub_FF969338\n"
               "MOV     R0, R4\n"
               "BL      sub_FF967E0C\n"
               "MOV     R0, R4\n"
               "BL      sub_FF87BE04\n"
               "MOV     R0, R4\n"
               "BL      sub_FF966A3C\n"
               "CMP     R0, #0\n"
               "BEQ     loc_FF87AB18\n"
               "BL      sub_FF969268\n"
               "BL      sub_FF96937C\n"
               "BL      sub_FF9693CC\n"
               "MOV     R0, R4\n"
               "BL      sub_FF966BB4\n"
               "TST     R0, #1\n"
               "MOVNE   R2, R4\n"
               "LDMNEFD SP!, {R3-R9,LR}\n"
               "MOVNE   R1, #1\n"
               "BNE     sub_FF878F74\n"
               "B       loc_FF87AB2C\n"
"loc_FF87AB18:\n"
               "MOV     R0, R4\n"
               "BL      sub_FF966B20\n"
               "BL      sub_FF969268\n"
               "BL      sub_FF96937C\n"
               "BL      sub_FF9693CC\n"
"loc_FF87AB2C:\n"
               "MOV     R0, R4\n"
               "BL      sub_FF87A91C\n"
               "MOV     R0, R4\n"
               "BL      sub_FF9685C0\n"
               "BL      sub_FF969040\n"
               "MOV     R0, R4\n"
             //"BL      sub_FF9686A8\n" // -
			   "BL      sub_FF9686A8_my\n" // ---------------->
               "MOV     R7, R0\n"
			   "BL      capt_seq_hook_raw_here\n"      // +
               "B       loc_FF87AB5C\n"
"loc_FF87AB50:\n"
               "LDR     R0, [R8,#0x10]\n"
               "CMP     R0, #0\n"
               "MOVNE   R7, #0x1D\n"
"loc_FF87AB5C:\n"
               "BL      sub_FF87E9CC\n"
               "BL      sub_FF87EA14\n"
               "BL      sub_FF87EA54\n"
               "MOV     R2, R4\n"
               "MOV     R1, #1\n"
               "MOV     R0, R7\n"
               "BL      sub_FF878F74\n"
               "BL      sub_FF968964\n"
               "CMP     R0, #0\n"
               "LDRNE   R0, [R4,#8]\n"
               "ORRNE   R0, R0, #0x2000\n"
               "STRNE   R0, [R4,#8]\n"
               "LDRH    R0, [R5,#0x9E]\n"
               "CMP     R0, #3\n"
               "BEQ     locret_FF87ABB4\n"
               "LDRH    R0, [R5,#0x9C]\n"
               "CMP     R0, #0\n"
               "LDREQH  R0, [R5,#0x98]\n"
               "CMPEQ   R0, #2\n"
               "MOVEQ   R0, R4\n"
               "LDMEQFD SP!, {R3-R9,LR}\n"
               "BEQ     sub_FF87C02C\n"
"locret_FF87ABB4:\n"
               "LDMFD   SP!, {R3-R9,PC}\n"
	);
};

void __attribute__((naked,noinline)) sub_FF9686A8_my() {
 asm volatile (
               "STMFD   SP!, {R0-R8,LR}\n"
               "MOV     R4, R0\n"
               "BL      sub_FF969524\n"
  			   "LDR    R1,=0xFFFFFFFF\n"
               "BL      sub_FF88544C\n"
               "LDR     R5, =0x7290\n"
               "LDR     R0, [R5,#0xC]\n"
               "CMP     R0, #0\n"
               "BNE     loc_FF9686F8\n"
               "MOV     R1, #1\n"
               "MOV     R0, #0\n"
               "BL      sub_FF839164\n"
               "STR     R0, [R5,#0xC]\n"
               "MOV     R3, #0\n"
               "STR     R3, [SP]\n"
               "LDR     R3, =0xFF968034\n"
               "LDR     R0, =0xFF968928\n"
               "MOV     R2, #0x400\n"
               "MOV     R1, #0x17\n"
               "BL      sub_FF839130\n"
"loc_FF9686F8:\n"
               "MOV     R2, #4\n"
               "ADD     R1, SP, #8\n"
               "MOV     R0, #0x8A\n"
               "BL      sub_FF88D5E0\n"
               "TST     R0, #1\n"
               "LDRNE   R1, =0x3C5\n"
               "LDRNE   R0, =0xFF9682CC\n"
               "BLNE    sub_FF81E88C\n"
               "LDR     R6, =0x38B44\n"
               "LDR     R8, =0x38A78\n"
               "LDR     R3, [R6]\n"
               "LDRSH   R2, [R6,#0xC]\n"
               "LDRSH   R1, [R6,#0xE]\n"
               "LDR     R0, [R8,#0x94]\n"
               "BL      sub_FF92FB4C\n"
               "BL      sub_FF863514\n"
               "LDR     R3, =0x7298\n"
               "STRH    R0, [R4,#0xA4]\n"
               "SUB     R2, R3, #4\n"
               "STRD    R2, [SP]\n"
               "MOV     R1, R0\n"
               "LDRH    R0, [R8,#0x5C]\n"
               "LDRSH   R2, [R6,#0xC]\n"
               "SUB     R3, R3, #8\n"
               "BL      sub_FF96B1AC\n"
               "BL      wait_until_remote_button_is_released\n"  // +
               "BL      capt_seq_hook_set_nr\n"                  // +   
               "B       sub_FF96875C\n" // +  Jump back to original FW code
 );
}

void __attribute__((naked,noinline)) exp_drv_task(){
 asm volatile(
               "STMFD   SP!, {R4-R8,LR}\n"
               "SUB     SP, SP, #0x20\n"
               "LDR     R8, =0xBB8\n"
               "LDR     R7, =0x4530\n"
               "LDR     R5, =0x42240\n"
               "MOV     R0, #0\n"
               "ADD     R6, SP, #0x10\n"
               "STR     R0, [SP,#0xC]\n"
"loc_FF8BFAE4:\n"
               "LDR     R0, [R7,#0x20]\n"
               "MOV     R2, #0\n"
               "ADD     R1, SP, #0x1C\n"
               "BL      sub_FF83891C\n"
               "LDR     R0, [SP,#0xC]\n"
               "CMP     R0, #1\n"
               "BNE     loc_FF8BFB30\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R0, [R0]\n"
               "CMP     R0, #0x13\n"
               "CMPNE   R0, #0x14\n"
               "CMPNE   R0, #0x15\n"
               "CMPNE   R0, #0x16\n"
               "BEQ     loc_FF8BFC94\n"
               "CMP     R0, #0x28\n"
               "BEQ     loc_FF8BFC1C\n"
               "ADD     R1, SP, #0xC\n"
               "MOV     R0, #0\n"
               "BL      sub_FF8BFA74\n"
"loc_FF8BFB30:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R1, [R0]\n"
               "CMP     R1, #0x2E\n"
               "BNE     loc_FF8BFB60\n"
               "LDR     R0, [SP,#0x1C]\n"
               "BL      sub_FF8C0DC8\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R1, #1\n"
               "BL      sub_FF885418\n"
               "BL      sub_FF81E844\n"
               "ADD     SP, SP, #0x20\n"
               "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FF8BFB60:\n"
               "CMP     R1, #0x2D\n"
               "BNE     loc_FF8BFB7C\n"
               "LDR     R2, [R0,#0x8C]!\n"
               "LDR     R1, [R0,#4]\n"
               "MOV     R0, R1\n"
               "BLX     R2\n"
               "B       loc_FF8C00BC\n"
"loc_FF8BFB7C:\n"
               "CMP     R1, #0x26\n"
               "BNE     loc_FF8BFBCC\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R1, #0x80\n"
               "BL      sub_FF88544C\n"
               "LDR     R0, =0xFF8BC204\n"
               "MOV     R1, #0x80\n"
               "BL      sub_FF95B31C\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R2, R8\n"
               "MOV     R1, #0x80\n"
               "BL      sub_FF885358\n"
               "TST     R0, #1\n"
               "LDRNE   R1, =0xE5F\n"
               "BNE     loc_FF8BFC88\n"
"loc_FF8BFBB8:\n"
               "LDR     R1, [SP,#0x1C]\n"
               "LDR     R0, [R1,#0x90]\n"
               "LDR     R1, [R1,#0x8C]\n"
               "BLX     R1\n"
               "B       loc_FF8C00BC\n"
"loc_FF8BFBCC:\n"
               "CMP     R1, #0x27\n"
               "BNE     loc_FF8BFC14\n"
               "ADD     R1, SP, #0xC\n"
               "BL      sub_FF8BFA74\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R1, #0x100\n"
               "BL      sub_FF88544C\n"
               "LDR     R0, =0xFF8BC214\n"
               "MOV     R1, #0x100\n"
               "BL      sub_FF95BCAC\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R2, R8\n"
               "MOV     R1, #0x100\n"
               "BL      sub_FF885358\n"
               "TST     R0, #1\n"
               "BEQ     loc_FF8BFBB8\n"
               "LDR     R1, =0xE69\n"
               "B       loc_FF8BFC88\n"
"loc_FF8BFC14:\n"
               "CMP     R1, #0x28\n"
               "BNE     loc_FF8BFC2C\n"
"loc_FF8BFC1C:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "ADD     R1, SP, #0xC\n"
               "BL      sub_FF8BFA74\n"
               "B       loc_FF8BFBB8\n"
"loc_FF8BFC2C:\n"
               "CMP     R1, #0x2B\n"
               "BNE     loc_FF8BFC44\n"
               "BL      sub_FF8AF668\n"
               "BL      sub_FF8B028C\n"
               "BL      sub_FF8AFDE0\n"
               "B       loc_FF8BFBB8\n"
"loc_FF8BFC44:\n"
               "CMP     R1, #0x2C\n"
               "BNE     loc_FF8BFC94\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R1, #4\n"
               "BL      sub_FF88544C\n"
               "LDR     R1, =0xFF8BC234\n"
               "LDR     R0, =0xFFFFF400\n"
               "MOV     R2, #4\n"
               "BL      sub_FF8AF0E4\n"
               "BL      sub_FF8AF36C\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R2, R8\n"
               "MOV     R1, #4\n"
               "BL      sub_FF885274\n"
               "TST     R0, #1\n"
               "BEQ     loc_FF8BFBB8\n"
               "LDR     R1, =0xE91\n"
"loc_FF8BFC88:\n"
               "LDR     R0, =0xFF8BC874\n"
               "BL      sub_FF81E88C\n"
               "B       loc_FF8BFBB8\n"
"loc_FF8BFC94:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "MOV     R4, #1\n"
               "LDR     R1, [R0]\n"
               "CMP     R1, #0x11\n"
               "CMPNE   R1, #0x12\n"
               "BNE     loc_FF8BFD04\n"
               "LDR     R1, [R0,#0x7C]\n"
               "ADD     R1, R1, R1,LSL#1\n"
               "ADD     R1, R0, R1,LSL#2\n"
               "SUB     R1, R1, #8\n"
               "LDMIA   R1, {R2-R4}\n"
               "STMIA   R6, {R2-R4}\n"
               "BL      sub_FF8BE3EC\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R1, [R0,#0x7C]\n"
               "LDR     R3, [R0,#0x8C]\n"
               "LDR     R2, [R0,#0x90]\n"
               "ADD     R0, R0, #4\n"
               "BLX     R3\n"
               "LDR     R0, [SP,#0x1C]\n"
               "BL      sub_FF8C1190\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R1, [R0,#0x7C]\n"
               "LDR     R3, [R0,#0x94]\n"
               "LDR     R2, [R0,#0x98]\n"
               "ADD     R0, R0, #4\n"
               "BLX     R3\n"
               "B       loc_FF8BFFFC\n"
"loc_FF8BFD04:\n"
               "CMP     R1, #0x13\n"
               "CMPNE   R1, #0x14\n"
               "CMPNE   R1, #0x15\n"
               "CMPNE   R1, #0x16\n"
               "BNE     loc_FF8BFDBC\n"
               "ADD     R3, SP, #0xC\n"
               "MOV     R2, SP\n"
               "ADD     R1, SP, #0x10\n"
               "BL      sub_FF8BE6C8\n"
               "CMP     R0, #1\n"
               "MOV     R4, R0\n"
               "CMPNE   R4, #5\n"
               "BNE     loc_FF8BFD58\n"
               "LDR     R0, [SP,#0x1C]\n"
               "MOV     R2, R4\n"
               "LDR     R1, [R0,#0x7C]!\n"
               "LDR     R12, [R0,#0x10]!\n"
               "LDR     R3, [R0,#4]\n"
               "MOV     R0, SP\n"
               "BLX     R12\n"
               "B       loc_FF8BFD90\n"
"loc_FF8BFD58:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "CMP     R4, #2\n"
               "LDR     R3, [R0,#0x90]\n"
               "CMPNE   R4, #6\n"
               "BNE     loc_FF8BFDA4\n"
               "LDR     R12, [R0,#0x8C]\n"
               "MOV     R0, SP\n"
               "MOV     R2, R4\n"
               "MOV     R1, #1\n"
               "BLX     R12\n"
               "LDR     R0, [SP,#0x1C]\n"
               "MOV     R2, SP\n"
               "ADD     R1, SP, #0x10\n"
               "BL      sub_FF8BF780\n"
"loc_FF8BFD90:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R2, [SP,#0xC]\n"
               "MOV     R1, R4\n"
               "BL      sub_FF8BFA14\n"
               "B       loc_FF8BFFFC\n"
"loc_FF8BFDA4:\n"
               "LDR     R1, [R0,#0x7C]\n"
               "LDR     R12, [R0,#0x8C]\n"
               "ADD     R0, R0, #4\n"
               "MOV     R2, R4\n"
               "BLX     R12\n"
               "B       loc_FF8BFFFC\n"
"loc_FF8BFDBC:\n"
               "CMP     R1, #0x22\n"
               "CMPNE   R1, #0x23\n"
               "BNE     loc_FF8BFE08\n"
               "LDR     R1, [R0,#0x7C]\n"
               "ADD     R1, R1, R1,LSL#1\n"
               "ADD     R1, R0, R1,LSL#2\n"
               "SUB     R1, R1, #8\n"
               "LDMIA   R1, {R2-R4}\n"
               "STMIA   R6, {R2-R4}\n"
               "BL      sub_FF8BD930\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R1, [R0,#0x7C]\n"
               "LDR     R3, [R0,#0x8C]\n"
               "LDR     R2, [R0,#0x90]\n"
               "ADD     R0, R0, #4\n"
               "BLX     R3\n"
               "LDR     R0, [SP,#0x1C]\n"
               "BL      sub_FF8BDC30\n"
               "B       loc_FF8BFFFC\n"
"loc_FF8BFE08:\n"
               "ADD     R1, R0, #4\n"
               "LDMIA   R1, {R2,R3,R12}\n"
               "STMIA   R6, {R2,R3,R12}\n"
               "LDR     R1, [R0]\n"
               "CMP     R1, #0x25\n"
               "ADDLS   PC, PC, R1,LSL#2\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE24:\n"
               "B       loc_FF8BFEBC\n"
"loc_FF8BFE28:\n"
               "B       loc_FF8BFEBC\n"
"loc_FF8BFE2C:\n"
               "B       loc_FF8BFEC4\n"
"loc_FF8BFE30:\n"
               "B       loc_FF8BFECC\n"
"loc_FF8BFE34:\n"
               "B       loc_FF8BFECC\n"
"loc_FF8BFE38:\n"
               "B       loc_FF8BFECC\n"
"loc_FF8BFE3C:\n"
               "B       loc_FF8BFEBC\n"
"loc_FF8BFE40:\n"
               "B       loc_FF8BFEC4\n"
"loc_FF8BFE44:\n"
               "B       loc_FF8BFECC\n"
"loc_FF8BFE48:\n"
               "B       loc_FF8BFECC\n"
"loc_FF8BFE4C:\n"
               "B       loc_FF8BFEE4\n"
"loc_FF8BFE50:\n"
               "B       loc_FF8BFEE4\n"
"loc_FF8BFE54:\n"
               "B       loc_FF8BFFD0\n"
"loc_FF8BFE58:\n"
               "B       loc_FF8BFFD8\n"
"loc_FF8BFE5C:\n"
               "B       loc_FF8BFFD8\n"
"loc_FF8BFE60:\n"
               "B       loc_FF8BFFD8\n"
"loc_FF8BFE64:\n"
               "B       loc_FF8BFFD8\n"
"loc_FF8BFE68:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE6C:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE70:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE74:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE78:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE7C:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFE80:\n"
               "B       loc_FF8BFED4\n"
"loc_FF8BFE84:\n"
               "B       loc_FF8BFEDC\n"
"loc_FF8BFE88:\n"
               "B       loc_FF8BFEDC\n"
"loc_FF8BFE8C:\n"
               "B       loc_FF8BFEF0\n"
"loc_FF8BFE90:\n"
               "B       loc_FF8BFEF0\n"
"loc_FF8BFE94:\n"
               "B       loc_FF8BFEF8\n"
"loc_FF8BFE98:\n"
               "B       loc_FF8BFF28\n"
"loc_FF8BFE9C:\n"
               "B       loc_FF8BFF58\n"
"loc_FF8BFEA0:\n"
               "B       loc_FF8BFF88\n"
"loc_FF8BFEA4:\n"
               "B       loc_FF8BFFB8\n"
"loc_FF8BFEA8:\n"
               "B       loc_FF8BFFB8\n"
"loc_FF8BFEAC:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEB0:\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEB4:\n"
               "B       loc_FF8BFFC0\n"
"loc_FF8BFEB8:\n"
               "B       loc_FF8BFFC8\n"
"loc_FF8BFEBC:\n"
//; jumptable FF8"FE1C entries 0,1,6
               "BL      sub_FF8BC71C\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEC4:\n"
//; jumptable FF8"FE1C entries 2,7
               "BL      sub_FF8BC9A0\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFECC:\n"
//; jumptable FF8"FE1C entries 3-5,8,9
               "BL      sub_FF8BCBA8\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFED4:\n"
//; jumptable FF8"FE1C entry 23
               "BL      sub_FF8BCE20\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEDC:\n"
//; jumptable FF8"FE1C entries 24,25
               "BL      sub_FF8BD018\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEE4:\n"
//; jumptable FF8"FE1C entries 10,11
             //"BL      sub_FF8BD2D4\n"    // -
               "BL      sub_FF8BD2D4_my\n" // ------------->
               "MOV     R4, #0\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEF0:\n"
//; jumptable FF8"FE1C entries 26,27
               "BL      sub_FF8BD414\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFEF8:\n"
//; jumptable FF8"FE1C entry 28
               "LDRH    R1, [R0,#4]\n"
               "STRH    R1, [SP,#0x10]\n"
               "LDRH    R1, [R5,#2]\n"
               "STRH    R1, [SP,#0x12]\n"
               "LDRH    R1, [R5,#4]\n"
               "STRH    R1, [SP,#0x14]\n"
               "LDRH    R1, [R5,#6]\n"
               "STRH    R1, [SP,#0x16]\n"
               "LDRH    R1, [R0,#0xC]\n"
               "STRH    R1, [SP,#0x18]\n"
               "BL      sub_FF8C0E3C\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFF28:\n"
//; jumptable FF8"FE1C entry 29
               "LDRH    R1, [R0,#4]\n"
               "STRH    R1, [SP,#0x10]\n"
               "LDRH    R1, [R5,#2]\n"
               "STRH    R1, [SP,#0x12]\n"
               "LDRH    R1, [R5,#4]\n"
               "STRH    R1, [SP,#0x14]\n"
               "LDRH    R1, [R5,#6]\n"
               "STRH    R1, [SP,#0x16]\n"
               "LDRH    R1, [R5,#8]\n"
               "STRH    R1, [SP,#0x18]\n"
               "BL      sub_FF8C0FA8\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFF58:\n"
//; jumptable FF8"FE1C entry 30
               "LDRH    R1, [R5]\n"
               "STRH    R1, [SP,#0x10]\n"
               "LDRH    R1, [R0,#6]\n"
               "STRH    R1, [SP,#0x12]\n"
               "LDRH    R1, [R5,#4]\n"
               "STRH    R1, [SP,#0x14]\n"
               "LDRH    R1, [R5,#6]\n"
               "STRH    R1, [SP,#0x16]\n"
               "LDRH    R1, [R5,#8]\n"
               "STRH    R1, [SP,#0x18]\n"
               "BL      sub_FF8C1054\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFF88:\n"
//; jumptable FF8"FE1C entry 31
               "LDRH    R1, [R5]\n"
               "STRH    R1, [SP,#0x10]\n"
               "LDRH    R1, [R5,#2]\n"
               "STRH    R1, [SP,#0x12]\n"
               "LDRH    R1, [R5,#4]\n"
               "STRH    R1, [SP,#0x14]\n"
               "LDRH    R1, [R5,#6]\n"
               "STRH    R1, [SP,#0x16]\n"
               "LDRH    R1, [R0,#0xC]\n"
               "STRH    R1, [SP,#0x18]\n"
               "BL      sub_FF8C10F4\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFFB8:\n"
//; jumptable FF8"FE1C entries 32,33
               "BL      sub_FF8BD76C\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFFC0:\n"
//; jumptable FF8"FE1C entry 36
               "BL      sub_FF8BDD34\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFFC8:\n"
//; jumptable FF8"FE1C entry 37
               "BL      sub_FF8BDF70\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFFD0:\n"
//; jumptable FF8"FE1C entry 12
               "BL      sub_FF8BE0EC\n"
               "B       loc_FF8BFFDC\n"
"loc_FF8BFFD8:\n"
//; jumptable FF8"FE1C entries 13-16
               "BL      sub_FF8BE288\n"
"loc_FF8BFFDC:\n"
//; jumptable FF8"FE1C default entry
//; jumptable FF8"FE1C entries 17-22,34,35
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R1, [R0,#0x7C]\n"
               "LDR     R3, [R0,#0x8C]\n"
               "LDR     R2, [R0,#0x90]\n"
               "ADD     R0, R0, #4\n"
               "BLX     R3\n"
               "CMP     R4, #1\n"
               "BNE     loc_FF8C0044\n"
"loc_FF8BFFFC:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "MOV     R2, #0xC\n"
               "LDR     R1, [R0,#0x7C]\n"
               "ADD     R1, R1, R1,LSL#1\n"
               "ADD     R0, R0, R1,LSL#2\n"
               "SUB     R4, R0, #8\n"
               "LDR     R0, =0x42240\n"
               "ADD     R1, SP, #0x10\n"
               "BL      sub_FFB3C720\n"
               "LDR     R0, =0x4224C\n"
               "MOV     R2, #0xC\n"
               "ADD     R1, SP, #0x10\n"
               "BL      sub_FFB3C720\n"
               "LDR     R0, =0x42258\n"
               "MOV     R2, #0xC\n"
               "MOV     R1, R4\n"
               "BL      sub_FFB3C720\n"
               "B       loc_FF8C00BC\n"
"loc_FF8C0044:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "LDR     R0, [R0]\n"
               "CMP     R0, #0xB\n"
               "BNE     loc_FF8C008C\n"
               "MOV     R3, #0\n"
               "STR     R3, [SP]\n"
               "MOV     R3, #1\n"
               "MOV     R2, #1\n"
               "MOV     R1, #1\n"
               "MOV     R0, #0\n"
               "BL      sub_FF8BC524\n"
               "MOV     R3, #0\n"
               "STR     R3, [SP]\n"
               "MOV     R3, #1\n"
               "MOV     R2, #1\n"
               "MOV     R1, #1\n"
               "MOV     R0, #0\n"
               "B       loc_FF8C00B8\n"
"loc_FF8C008C:\n"
               "MOV     R3, #1\n"
               "MOV     R2, #1\n"
               "MOV     R1, #1\n"
               "MOV     R0, #1\n"
               "STR     R3, [SP]\n"
               "BL      sub_FF8BC524\n"
               "MOV     R3, #1\n"
               "MOV     R2, #1\n"
               "MOV     R1, #1\n"
               "MOV     R0, #1\n"
               "STR     R3, [SP]\n"
"loc_FF8C00B8:\n"
               "BL      sub_FF8BC664\n"
"loc_FF8C00BC:\n"
               "LDR     R0, [SP,#0x1C]\n"
               "BL      sub_FF8C0DC8\n"
               "B       loc_FF8BFAE4\n"
);
};
void __attribute__((naked,noinline)) sub_FF8BD2D4_my(){ 
 asm volatile(
               "STMFD   SP!, {R4-R8,LR}\n"
               "LDR     R7, =0x4530\n"
               "MOV     R4, R0\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R1, #0x3E\n"
               "BL      sub_FF88544C\n"
               "LDRSH   R0, [R4,#4]\n"
               "MOV     R2, #0\n"
               "MOV     R1, #0\n"
               "BL      sub_FF8BC288\n"
               "MOV     R6, R0\n"
               "LDRSH   R0, [R4,#6]\n"
               "BL      sub_FF8BC398\n"
               "LDRSH   R0, [R4,#8]\n"
               "BL      sub_FF8BC3F0\n"
               "LDRSH   R0, [R4,#0xA]\n"
               "BL      sub_FF8BC448\n"
               "LDRSH   R0, [R4,#0xC]\n"
               "MOV     R1, #0\n"
               "BL      sub_FF8BC4A0\n"
               "MOV     R5, R0\n"
               "LDR     R0, [R4]\n"
               "LDR     R8, =0x42258\n"
               "CMP     R0, #0xB\n"
               "MOVEQ   R6, #0\n"
               "MOVEQ   R5, #0\n"
               "BEQ     loc_FF8BD368\n"
               "CMP     R6, #1\n"
               "BNE     loc_FF8BD368\n"
               "LDRSH   R0, [R4,#4]\n"
               "LDR     R1, =0xFF8BC1F4\n"
               "MOV     R2, #2\n"
               "BL      sub_FF95B668\n"
               "STRH    R0, [R4,#4]\n"
               "MOV     R0, #0\n"
               "STR     R0, [R7,#0x28]\n"
               "B       loc_FF8BD370\n"
"loc_FF8BD368:\n"
               "LDRH    R0, [R8]\n"
               "STRH    R0, [R4,#4]\n"
"loc_FF8BD370:\n"
               "CMP     R5, #1\n"
               "LDRNEH  R0, [R8,#8]\n"
               "BNE     loc_FF8BD38C\n"
               "LDRSH   R0, [R4,#0xC]\n"
               "LDR     R1, =0xFF8BC278\n"
               "MOV     R2, #0x20\n"
               "BL      sub_FF8C0DF8\n"
"loc_FF8BD38C:\n"
               "STRH    R0, [R4,#0xC]\n"
               "LDRSH   R0, [R4,#6]\n"
             //"BL      sub_FF8AF3D8\n"
               "BL      sub_FF8AF3D8_my\n" // + ------------->
               "LDRSH   R0, [R4,#8]\n"
               "MOV     R1, #1\n"
               "BL      sub_FF8AFB28\n"
               "MOV     R1, #0\n"
               "ADD     R0, R4, #8\n"
               "BL      sub_FF8AFBB0\n"
               "LDRSH   R0, [R4,#0xE]\n"
               "BL      sub_FF8B7694\n"
               "LDR     R4, =0xBB8\n"
               "CMP     R6, #1\n"
               "BNE     loc_FF8BD3E4\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R2, R4\n"
               "MOV     R1, #2\n"
               "BL      sub_FF885358\n"
               "TST     R0, #1\n"
               "LDRNE   R1, =0x5A3\n"
               "LDRNE   R0, =0xFF8BC874\n"
               "BLNE    sub_FF81E88C\n"
"loc_FF8BD3E4:\n"
               "CMP     R5, #1\n"
               "LDMNEFD SP!, {R4-R8,PC}\n"
               "LDR     R0, [R7,#0x1C]\n"
               "MOV     R2, R4\n"
               "MOV     R1, #0x20\n"
               "BL      sub_FF885358\n"
               "TST     R0, #1\n"
               "LDRNE   R1, =0x5A8\n"
               "LDRNE   R0, =0xFF8BC874\n"
               "LDMNEFD SP!, {R4-R8,LR}\n"
               "BNE     sub_FF81E88C\n"
               "LDMFD   SP!, {R4-R8,PC}\n"
);
};

void __attribute__((naked,noinline)) sub_FF8AF3D8_my(){ // 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R5, =0x4240\n"
                "MOV     R4, R0\n"
                "LDR     R0, [R5,#4]\n"
                "CMP     R0, #1\n"
                "LDRNE   R1, =0x146\n"
                "LDRNE   R0, =0xFF8AF1DC\n"
                "BLNE    sub_FF81E88C\n"
                "CMN     R4, #0xC00\n"
                "LDREQSH R4, [R5,#2]\n"
                "CMN     R4, #0xC00\n"
                "MOVEQ   R1, #0x14C\n"
                "LDREQ   R0, =0xFF8AF1DC\n"
                "STRH    R4, [R5,#2]\n"
                "BLEQ    sub_FF81E88C\n"
                "MOV     R0, R4\n"

              //"BL      sub_FFA1484C\n" // -
   			    "BL      apex2us\n"  // +

                "MOV     R4, R0\n"
                "BL      sub_FF8F8EE8\n"
                "MOV     R0, R4\n"
                "BL      sub_FF8FF168\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x151\n"
                "LDMNEFD SP!, {R4-R6,LR}\n"
                "LDRNE   R0, =0xFF8AF1DC\n"
                "BNE     sub_FF81E88C\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
	);
};

